<?php
class ORMpz_ecom_parcel {
  public function toObj($args) {
    $obj = new stdClass();
    if (isset($args->track_id)) {
      $obj->track_id =  $args->track_id;
    }
    if (isset($args->date_added)) {
      $obj->date_added =  $args->date_added;
    }
    if (isset($args->date_last_mod)) {
      $obj->date_last_mod =  $args->date_last_mod;
    }
    if (isset($args->date_delivery)) {
      $obj->date_delivery =  $args->date_delivery;
    }
    if (isset($args->addr_id)) {
      $obj->addr_id =  $args->addr_id;
    }
    if (isset($args->addr_name)) {
      $obj->addr_name =  $args->addr_name;
    }
    if (isset($args->addr_tel)) {
      $obj->addr_tel =  $args->addr_tel;
    }
    if (isset($args->addr_mob)) {
      $obj->addr_mob =  $args->addr_mob;
    }
    if (isset($args->addr_address)) {
      $obj->addr_address =  $args->addr_address;
    }
    if (isset($args->addr_suburb)) {
      $obj->addr_suburb =  $args->addr_suburb;
    }
    if (isset($args->addr_city)) {
      $obj->addr_city =  $args->addr_city;
    }
    if (isset($args->addr_state)) {
      $obj->addr_state =  $args->addr_state;
    }
    if (isset($args->addr_country)) {
      $obj->addr_country =  $args->addr_country;
    }
    if (isset($args->addr_zip)) {
      $obj->addr_zip =  $args->addr_zip;
    }
    if (isset($args->ship_id)) {
      $obj->ship_id =  $args->ship_id;
    }
    if (isset($args->ship_name)) {
      $obj->ship_name =  $args->ship_name;
    }
    if (isset($args->track_no)) {
      $obj->track_no =  $args->track_no;
    }
    if (isset($args->weight)) {
      $obj->weight =  $args->weight;
    }
    if (isset($args->comment)) {
      $obj->comment =  $args->comment;
    }
    return $obj;
  }
}
?>
